
package com.shop.cloud.mall.api.controller;

import com.shop.cloud.common.core.util.R;
import com.shop.cloud.mall.api.service.UserGradeConfigService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;

/**
 * 用户等级配置
 *
 * @author
 * @date 2023-03-15 14:13:46
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/usergradeconfig")
@Tag(description = "usergradeconfig", name = "用户等级配置API")
public class UserGradeConfigController {

    private final UserGradeConfigService userGradeConfigService;

    /**
     * 用户等级配置查询
     * @param grade
     * @return R
     */
    @Operation(summary = "用户等级配置查询")
    @GetMapping("/{grade}")
    public R getById(@PathVariable("grade") Integer grade) {
        return R.ok(userGradeConfigService.getByGrade(grade));
    }


}
